<h2 class="sr-only"><%= t('sufia.homepage.featured_works.title') %></h2>
<% if @featured_work_list.empty? %>
  <p><%= t('sufia.homepage.featured_works.no_works') %></p>
<% elsif can? :update, FeaturedWork %>
  <%= form_for [sufia, @featured_work_list] do |f| %>
    <div class="panel-group dd" id="dd">
      <ol id="featured_works">
        <%= f.fields_for :featured_works do |featured| %>
          <%= render 'sortable_featured', f: featured %>
        <% end %>
      </ol>
    </div>
    <%= f.submit("Save order", class: 'btn btn-default') %>
  <% end %>
<% else %>
  <ol id="featured_works">
    <%= render partial: 'featured', collection: @featured_work_list.featured_works %>
  </ol>
<% end %>
